package com.itheima.day15.ZuoYe.ZuoYe3;

import java.lang.reflect.Constructor;
import java.lang.reflect.Method;

public class Test {
    public static void main(String[] args) throws Exception {
        Class c1 = DemoClass.class;
        Constructor constructor = c1.getConstructor();
        Object o = constructor.newInstance();
        Method run = c1.getMethod("run");
        run.invoke(o);
        System.out.println("-----------------");

    }
}
